import pandas as pd

df = pd.read_csv('../static/data/car_info.csv')
df = df[['brand_name', 'outter_name', 'dcar_score', 'car_name', 'year', 'official_price', 'dealer_price.1']]
df['dealer_price'] = df['dealer_price.1']
df.drop('dealer_price.1', axis=1, inplace=True)
df = df[df['official_price'] != '暂无报价']
df['official_price'] = df['official_price'].apply(lambda x: x.replace('万', '')).astype(float)
df['dealer_price'] = df['dealer_price'].apply(lambda x: x.replace('万', '')).astype(float)
df.to_csv('../static/data/car_info_pre.csv', index=False)
